package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.SelectCourseMapper;
import com.demo.studentmanager.dto.SelectCourseListDto;
import com.demo.studentmanager.entity.Course;
import com.demo.studentmanager.service.ISelectCourseService;
import com.demo.studentmanager.vo.SelectCourseVO;
import org.springframework.stereotype.Service;

/**
 * @author ZHB
 * @version 1.0.0
 * @date Create in 2020/11/19
 */

@Service
public class SelectCourseServiceImpl extends ServiceImpl<SelectCourseMapper, Course> implements ISelectCourseService {
    @Override
    public IPage<SelectCourseVO> getSelectCourseList(SelectCourseListDto selectCourseListDto) {
        IPage<SelectCourseVO> page = new Page<>(selectCourseListDto.getCurrent(), selectCourseListDto.getSize());
        return baseMapper.getSelectCourseList(page, selectCourseListDto);
    }

}
